<template>
<!-- 画廊轮播 -->
<div class="gallery" @click="$emit('hide-gall')" @touchmove.prevent @mousewheel.prevent>
  <div class="wrapper" >
  <swiper :options="swiperOption" ref="mySwiper">
     <swiper-slide v-for="(item,index) of GalleryTwo" :key="index">
      <img :src="item.url"/>
     </swiper-slide>
      <div class="swiper-pagination" slot="pagination"></div>
   </swiper>
   </div>
</div>
</template>

<script>
export default {
  name: 'GalleryTwo',
  props: {
    GalleryTwo: Array
  },
  data () {
    return {
      swiperOption: {
        pagination: {
          el: '.swiper-pagination',
          type: 'fraction'
        },
        observer: true,
        observeParents: true
      }
    }
  }
}
</script>

<style lang="stylus" scoped="scoped">
  .wrapper >>> .swiper-container
    overflow inherit
  .gallery
    position fixed
    top 0
    left 0
    right 0
    bottom 0
    display flex
    background #000000
    flex-direction column
    justify-content center
    z-index 99
    .wrapper
      width 100%
      img
        flex 1
        width 100%
      .swiper-pagination
        color #FFFFFF
        bottom -2.4rem
</style>
